package cn.broadsense.thrid.result;

import cn.broadsense.thrid.param.EvUpPlantTaskParam;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 任务详情
 *
 * @author pengxin
 * @date 2023-04-12 10:39
 */
@NoArgsConstructor
@Data
public class EvPlanTaskDetails implements Serializable {

    private static final long serialVersionUID = 5708430754710190811L;


    private String planTaskName;
    private String planTaskId;
    private Integer analysisType;
    private Integer enableStatus;
    private OrchestrationResult orchestration;
    private String createTime;
    private String createUserName;
    private List<ChannelAlgorithmInfosResult> channelAlgorithmInfos;

    @NoArgsConstructor
    @Data
    public static class OrchestrationResult {
        private String orchestrationType;
        private DisposableResult disposable;
        private List<EvUpPlantTaskParam.OrchestrationParam.AnalysisPeriodsParam> analysisPeriods;
        private CycleResult cycle;
        private PollingResult polling;

        @NoArgsConstructor
        @Data
        public static class DisposableResult {
            private String startDate;
            private String endDate;
        }

        @NoArgsConstructor
        @Data
        public static class CycleResult {
            private List<Integer> dayOfWeek;
        }

        @NoArgsConstructor
        @Data
        public static class PollingResult {
            private Boolean enable;
            private Integer pollingInterval;
            private Integer pollingCount;
        }
    }

    @NoArgsConstructor
    @Data
    public static class ChannelAlgorithmInfosResult {
        private String channelCode;
        private String algorithmId;
        private Integer enable;
        private Integer runningStatus;
        private String logMsg;
        private String config;
    }
}
